Visual Basic (Declaration) | |
---|---|
Function CountAsync( _ Optional ByVal predicate As Expression(Of Func(Of T,Boolean)), _ Optional ByVal onSuccess As Action(Of Integer), _ Optional ByVal onFail As Action(Of Exception) _ ) As OperationResult(Of Integer) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As IRepository(Of T) Dim predicate As Expression(Of Func(Of T,Boolean)) Dim onSuccess As Action(Of Integer) Dim onFail As Action(Of Exception) Dim value As OperationResult(Of Integer) value = instance.CountAsync(predicate, onSuccess, onFail) |
C# | |
---|---|
OperationResult<int> CountAsync( Expression<Func<T,bool>> predicate, Action<int> onSuccess, Action<Exception> onFail ) |
C++/CLI | |
---|---|
OperationResult<int>^ CountAsync( Expression<Func<T^,bool>^>^ predicate, Action<int>^ onSuccess, Action<Exception^>^ onFail ) |
Parameters
- predicate
- Optional predicate to filter the entities
- onSuccess
- Optional callback to be called when the count was successful.
- onFail
- Optional callback to be called when the count failed.
Return Value
Asynchronous operation result.Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family